package com.chwn.curiousdiary.adapter;

import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.chwn.harulib.mvp.base.BaseMVPFragment;

import java.util.ArrayList;

/**
 * Created by Myshikin on 2017/3/20.
 */
public class FragmentContentAdapter extends FragmentPagerAdapter {
    private ArrayList<BaseMVPFragment> mFragmentLists;

    public FragmentContentAdapter(FragmentManager fm, @NonNull ArrayList<BaseMVPFragment> fragmentLists) {
        super(fm);
        this.mFragmentLists = fragmentLists;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragmentLists.get(position);
    }

    @Override
    public int getCount() {
        return mFragmentLists.size();
    }
}
